package com.zm.rpc.server.dispatcher.handler;


import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;


import com.zm.rpc.protocol.request.RpcHeartBeat;
import com.zm.rpc.protocol.response.RpcHeartBeatResp;


@Component
public class PingHandler implements IDispatcherHandler<RpcHeartBeat>{
    private static final Logger log = Logger.getLogger(PingHandler.class);
    @Override
    public Object doExecute(RpcHeartBeat req) {
        log.debug(String.format("Ping msg:%s", req.toString()));
        return RpcHeartBeatResp.PONG;
    }

}
